package com.xc.quickstart.common.context;


import com.alibaba.ttl.TransmittableThreadLocal;
import com.xc.quickstart.common.model.JobContextModel;

public class JobContext {
    private static ThreadLocal<JobContextModel> threadLocal = new TransmittableThreadLocal<>();

    public static void setJobContextModel(JobContextModel jobContextModel) {
        threadLocal.set(jobContextModel);
    }

    public static void removeJobContextModel() {
        threadLocal.remove();
    }

    public static JobContextModel getJobContextModel() {
        return threadLocal.get();
    }


}
